1. Field of the Invention
The present invention relates to an apparatus and a method for automatically correcting images by employing a luminance histogram. More particularly, the present invention relates to an apparatus and a method for correcting images by calculating an Estimated Optimal Average Luminance (EOAL) of an incoming image under pickup conditions of the incoming image to determine corrections such that the average luminance of the incoming images have an optimal luminance level.
2. Description of the Related Art
An image is evaluated as good when a luminance distribution has intermediate values in a luminance histogram of an image signal, that is, when a number of pixels having luminance level values of between 100 to 150 are present in a luminance distribution having 256 luminance levels of between 0 to 255. When there are a number of signals relatively having levels of 100 or less, a screen becomes dark and it is difficult to identify an image included in dark regions. When there are a number of signals having levels of 150 or more, the overall screen becomes bright.
In order to solve such an imbalance of the image, each luminance of pixels is adjusted to correct the incoming image. One of the methods for correcting the incoming image is to use a brightness curve. FIG. 1 is a block diagram illustrating an apparatus for correcting images using a conventional brightness curve.
Referring to FIG. 1, the conventional image correcting apparatus comprises a histogram generating means 110, a stretch value designating means 120, a brightness curve generating means 130, and a luminance adjusting means 140 for using the brightness curve.
The histogram generating means 110 generates a luminance histogram of an incoming image. FIG. 2 is a diagram illustrating one example of the histogram. In FIG. 2, the X coordinate indicates a luminance level of the incoming image, wherein the luminance level of the incoming image may be divided into 256 levels of 0 to 255. The Y coordinate indicates the number of pixels (i.e., the number of luminance level frequency).
Returning to FIG. 1, the stretch value designating means 120 receives information about how many degrees that a luminance of the image can be adjusted, that is, information about the luminance stretch value. The stretch value is then used to generate the brightness curve.
The brightness curve generating means 130 uses the stretch value to generate the brightness curve. When the stretch value is designated, L0 is then determined so as to have the sum of the number of pixels within 0 to L0 to be within the stretch value. For example, when the stretch value is 0.5%, L0 is determined as a minimum value such that the sum of the number of pixels within 0 to L0, when divided by the total number of pixels, is not more than 0.005. The value L1 is then determined as a maximum value such that the sum of the number of pixels within L1 to 255, when divided by the total number of pixels, is also not more than 0.005. Referring to FIG. 2, the values of L0 and L1 are shown when the stretch value is 0.5%. Once the values of L0 and L1 are determined, the brightness curve is generated therefrom. FIG. 3 is a diagram illustrating an example of a conventional brightness curve. Referring to FIG. 3, the X coordinate indicates a luminance level of the incoming image, and the Y coordinate indicates a luminance level of an output image, that is, the corrected image.
The luminance adjusting means 140 uses the brightness curve to correct the image. When the brightness curve is applied to each of the Red (R), Green (G), and Blue (B) channels, brightness and contrast of an image are adjusted. Such a conventional apparatus for correcting the image, however, has a problem in that the luminance, that is, brightness, is uniformly adjusted. Specifically, a method for making bright regions brighter and dark regions darker has been used, which could not reflect the luminance distribution characteristics of the image.
Furthermore, an appropriate degree of correction for the luminance of the image could not be readily determined.
Accordingly, a need exists for a system and method for selectively increasing contrasts of bright and dark regions and automatically determining an appropriate degree of correction for an image.